package com.zmn.oms.services.interfaces.graborder;

import com.zmn.oms.model.mongo.graborder.GrabOrder;

import java.util.Date;

/**
 * 类描述：抢单
 *
 * @author liuying
 * @date 2021/07/13 11:14
 */
public interface GrabOrderService {

    /**
     * 查询抢单信息
     * @param workId
     * @return
     */
    GrabOrder findGrabOrderByWorkId(Long workId);

    /**
     * 更新状态
     *
     * @param workId
     * @param grabStatus
     * @param masterId
     */
    void updateGrabStatus(Long workId, Integer grabStatus, Integer masterId);

    /**
     * 保存订单
     *
     * @param grabOrder
     */
    void saveGrabOrder(GrabOrder grabOrder);

    /**
     * 删除
     *
     * @param workId
     */
    void deleteGrabOrder(Long workId);

    /**
     * 定时删除抢单信息
     * @param date
     */
    void deleteGrabOrderByDate(Date date);
}
